﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using Raven.Client.Document;
using Simple.Data;
using NewsCrawler.Common.Interfaces;

namespace NewsCrawler.Common.Models
{
    public class Article
    {
        public string Id { get { return Url.GetHashCode().ToString(); } }
        public string Summary { get; set; }
        public string Content { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public Category Category { get; set; }
        public DateTime PublishDate { get; set; }
        private List<string> _tags;
        public List<string> Tags
        {
            get { return _tags ?? (_tags = new List<string>()); }
            set { _tags = value; }
        }

        public int ViewCount { get; set; }
        public Publisher Publisher { get; set; }
        public string CultureCode { get; set; }
        public string Url { get; set; }
        private List<string> _images;
        public List<string> Images
        {
            get { return _images ?? (_images = new List<string>()); }
            set { _images = value; }
        }

        public string Folder { get; set; }
        public IParser Parser { get; set; }
    }
}
